﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace AppQlyNhaSach.Configuaration
{
	public partial class frmSettings : DevExpress.XtraEditors.XtraForm
	{
		public frmSettings()
		{
			InitializeComponent();
		}

		private void frmSettings_Load(object sender, EventArgs e)
		{
			numSLNhapMin.Value = Properties.Settings.Default.SLNhapMin;
			numSLTonMin.Value = Properties.Settings.Default.SLTonMin;
			numSTNoMax.Value = Properties.Settings.Default.STNoMax;
			numSLTonMinB.Value = Properties.Settings.Default.SLTonMinB;
		}

		private void simpleButton2_Click(object sender, EventArgs e)
		{
			Properties.Settings.Default.SLNhapMin = (int)numSLNhapMin.Value;
			Properties.Settings.Default.SLTonMin = (int)numSLTonMin.Value;
			Properties.Settings.Default.STNoMax = (int)numSTNoMax.Value;
			Properties.Settings.Default.SLTonMinB = (int)numSLTonMinB.Value;
			Properties.Settings.Default.Save();
			this.DialogResult = DialogResult.OK;
		}

		private void simpleButton1_Click(object sender, EventArgs e)
		{
			frmConfig config = new frmConfig();
			config.ShowDialog();
		}
	}
}